package com.app.designpatternslearn.behavior.mediatorpattern

import com.app.designpatternslearn.behavior.mediatorpattern.code.Mediator
import com.app.designpatternslearn.behavior.mediatorpattern.code.Node

fun main() {

    val mediator = Mediator()

    val node1 = Node(mediator)
    node1.name = "node1"
    val node2 = Node(mediator)
    node2.name = "node2"
    val node3 = Node(mediator)
    node3.name = "node3"

    node2.sendMessage("node1", "hello")

}